const js = {
	data() {
		return {
			rules: {
				SysStoreName: [{
					required: true,
					trigger: 'blur',
					validator: (rule, value, callback) => {
						if (value === null || value === "") {
							var msg = this.stringFormat(this.comLan.Require1, this.keyLan[
								"SysStoreName"]);
							callback(new Error(msg));
						} else {
							callback();
						}
					}
				}],
				Director: [{
					required: true,
					trigger: 'blur',
					validator: (rule, value, callback) => {
						if (value === null || value === "") {
							var msg = this.stringFormat(this.comLan.Require1, this.keyLan["Director"]);
							callback(new Error(msg));
						} else {
							callback();
						}
					}
				}],
				Province: [{
					required: true,
					trigger: 'blur',
					validator: (rule, value, callback) => {
						if (value === null || value === "") {
							var msg = this.stringFormat(this.comLan.Require1, this.keyLan["Province"]);
							callback(new Error(msg));
						} else {
							callback();
						}
					}
				}],
				City: [{
					required: true,
					trigger: 'blur',
					validator: (rule, value, callback) => {
						if (value === null || value === "") {
							var msg = this.stringFormat(this.comLan.Require1, this.keyLan["City"]);
							callback(new Error(msg));
						} else {
							callback();
						}
					}
				}],
				District: [{
					required: true,
					trigger: 'blur',
					validator: (rule, value, callback) => {
						if (value === null || value === "") {
							var msg = this.stringFormat(this.comLan.Require1, this.keyLan["District"]);
							callback(new Error(msg));
						} else {
							callback();
						}
					}
				}],
				Address: [{
					required: true,
					trigger: 'blur',
					validator: (rule, value, callback) => {
						if (value === null || value === "") {
							var msg = this.stringFormat(this.comLan.Require1, this.keyLan["Address"]);
							callback(new Error(msg));
						} else {
							callback();
						}
					}
				}],
			}
		};
	},
	computed: {
		EnumSysStoreType() {
			var list = this.emptyArray(EnumSysStoreType);
			if (list == null || list.length == 0) return [];
			if (this.user.isAdminStore) {
				return list;
			}
			var r = [];
			//第一个不展示
			for (var i = 1; i < list.length; i++) {
				var item = list[i];
				r.push(item);
			}
			return r;
		},
		EnumStatus() {
			return this.emptyArray(EnumStatus);
		},
	},
	methods: {}
}

export default js;
